package ${packageName}.service.impl;

import org.springframework.stereotype.Service;
import site.lanmushan.framework.dto.QueryInfo;
import site.lanmushan.framework.exception.OperateException;
import site.lanmushan.framework.mapper.wrapper.DefaultWrapper;
import site.lanmushan.framework.mapper.wrapper.QueryWrapper;
import site.lanmushan.framework.query.service.BaseService;
import site.lanmushan.framework.query.util.PageUtil;
import site.lanmushan.framework.query.util.QueryInfoUtil;
import ${packageName}.api.entity.${entityName};
import ${packageName}.api.service.${entityName}Service;
import ${packageName}.mapper.${entityName}Mapper;
import org.springframework.transaction.annotation.Transactional;

import java.util.Arrays;
import java.util.List;

/**
 * @author Administrator
 */

@Service
@Transactional(rollbackFor = Exception.class)
public class ${entityName}ServiceImpl extends BaseService<${entityName}, ${entityName}Mapper> implements ${entityName}Service {

        #foreach($col in $columnList)
        #if ($col.unique == 1)
        #set($upropertyName="${col.propertyName.substring(0, 1).toUpperCase()}${col.propertyName.substring(1)}")

        @Override
        public List<${entityName}> select${entityName}By${upropertyName}(List<${col.javaType}> ${col.propertyName}List){
        QueryWrapper queryWrapper = new DefaultWrapper();
        queryWrapper.in("${col.column_name}",${col.propertyName}List.toArray());
        //queryWrapper.eq("deleted", 0);
        return getQueryMapper().selectAllList(queryWrapper);
        }

        #end
        #end

}
